<template>
  <view class="list-components-001">
    <view class="top-content">
      <view class="image-box">
        <image :src="showData.imageUrl" mode="widthFix"></image>
      </view>
      <view class="type-layout">{{ showData.artist }}</view>
      <view class="info-box">
        <view class="title">{{ showData.title }}</view>
        <view class="artist">{{ showData.artist }}</view>
        <view class="date">{{ showData.date }}</view>
        <view class="location">{{ showData.location }}</view>
        <view class="price-status-box">
          <view class="status">{{ showData.status }}</view>
          <view class="price-box">
            <text class="rmb">¥</text>
            <text class="price">{{ showData.price }}</text>
            <text class="price-des">起</text>
          </view>
        </view>
      </view>
    </view>
    <view class="bottom-content" v-if="showData.countdown">
      <text class="countdown">
        <text class="iconfont icon-weibiaoti--40"></text>
        <text>后天11:00开枪</text>
      </text>
      <text class="countdown-text">01天15:53:39</text>
    </view>
  </view>
</template>

<script>
import { defineComponent, reactive, toRefs } from "vue";
export default defineComponent({
  name: "list001",
  props: {
    showData: {
      type: Object,
      default: () => {
        return {
          id: 11,
          title: "北京·柯南·永远的一瞬主题快闪 官方限定特典礼包",
          artist: "展览休闲",
          location: "北京 | 西单大悦城1F东大堂",
          date: "2025.09.12-10.19",
          price: "139",
          status: "售票中",
          imageUrl: "/static/dataImage/damai/011.webp",
        };
      },
    },
  },
  components: {},
  setup(props) {
    const data = reactive({});
    return {
      ...toRefs(data),
    };
  },
});
</script>

<style scoped lang="less">
.list-components-001 {
  position: relative;
  background: #fff;
  border-radius: 15rpx;
  overflow: hidden;
  padding: 20rpx;
  .top-content {
    display: flex;

    .image-box {
      width: 190rpx;
      border-radius: 15rpx;
      height: 250rpx;
      overflow: hidden;
      image {
        width: 100%;
        display: block;
      }
    }

    .type-layout {
      position: absolute;
      left: 15rpx;
      top: 15rpx;
      padding: 2rpx 8rpx;
      font-weight: 400;
      font-size: 20rpx;
      color: #fff;
      background: #ff1268;
      border-radius: 4rpx;
    }
    .info-box {
      padding: 0 20rpx;
      flex: 1;
      .artist {
        font-size: 24rpx;
        color: #ff7300;
        margin-bottom: 10rpx;
      }
      .title {
        font-size: 28rpx;
        color: #000;
        // 显示2行多余省略号
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-weight: 400;
        line-height: 40rpx;
      }
      .location {
        font-size: 24rpx;
        color: #777;
        margin-bottom: 10rpx;
      }
      .date {
        font-size: 24rpx;
        color: #777;
        margin: 10rpx 0;
      }
      .price-status-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .status {
        font-size: 20rpx;
        color: #777;
        border: 1rpx solid #999;
        padding: 0 10rpx;
        border-radius: 6rpx;
      }
      .price-box {
        .rmb {
          font-size: 22rpx;
          font-weight: 700;
          margin-right: 5rpx;
        }
        .price {
          font-size: 36rpx;
          font-weight: 700;
        }
        .price-des {
          font-weight: 300;
          font-size: 22rpx;
          margin-left: 5rpx;
        }
      }
    }
  }
  .bottom-content {
    background: #ffd2c086;
    margin-top: 15rpx;
    padding: 15rpx 20rpx;
    border-radius: 15rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .countdown {
      font-size: 24rpx;
      color: #ff7300;
      .icon-weibiaoti--40{
        margin-right: 8rpx;
        font-size: 22rpx;
      }
    }
    .countdown-text {
      font-size: 26rpx;
      color: #f14c00;
      font-weight: 700;
    }
  }
}
</style>
